<style type="text/css">
    .imgDiv {
        display: inline-block;
        position: relative;
        float: left;

    }

    .imgDiv .delete {
        position: absolute;
        top: 0px;
        right: 0px;
        width: 50px;
        height: 50px;
        display: none;
    }
</style>
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">

            <div class="ibox-content">
                <form method="get" class="form-horizontal">

                    <div class="form-group">
                        <label class="col-sm-2 control-label">修改商品信息</label>
                        <div class="col-sm-2">
                            <select class="form-control m-b select2" name="item_id" id="item_id">

                                {foreach $DATA['feature'] as $value}
                                {if condition="$value['id'] eq $DATA['data']['item_id']"}
                                     <option data-id="{$value['id']}" selected>{$value['item']}</option>
                                {else/}
                                     <option data-id="{$value['id']}">{$value['item']}</option>
                                {/if}

                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">商品品牌</label>
                        <div class="col-sm-2"><select class="form-control m-b select2" name="brand_id" id="brand_id">

                            {foreach $DATA['brand'] as $value}
                            {if condition="$value['id'] eq $DATA['data']['brand_id']"}
                                 <option data-id="{$value['id']}" selected>{$value['title']}</option>
                            {else/}
                                 <option data-id="{$value['id']}">{$value['title']}</option>
                            {/if}

                            {/foreach}
                        </select>
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">商品名：</label>
                        <div class="col-sm-3"><input type="text" name="title" class="form-control input-lg"
                                                     value="{$DATA['data']['title']}">
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">原价：</label>
                        <div class="col-sm-3"><input type="text" name="original_cost" class="form-control input-lg"
                                                     value="{$DATA['data']['original_cost']}">
                        </div>
                    </div>


                    <div class="form-group" id="addprice">
                        <div class="layui-form-item" id="price">
                            <div class="layui-inline ">
                                <label class="layui-form-label col-sm-2 control-label">添加现价：</label>

                                <!--<div class="layui-input-inline col-sm-3">-->
                                <!--<input type="text " name="money" autocomplete="off " class="layui-input form-control input-lg">-->
                                <!--</div>-->

                                <label class="layui-form-label " id="add">
                                    <div class="col-sm-3">
                                    </div>
                                    <strong><a href="javascritp:;"><span
                                            class="glyphicon glyphicon-plus"></span></a></strong>
                                </label>
                            </div>
                        </div>
                    </div>


                    {foreach $DATA['price'] as $value}
                    <div class="form-group marque_price">
                        <label class="layui-form-label col-sm-2 control-label">尺寸：</label>
                        <div class="col-sm-3">
                            <input type="text" name="marque" autocomplete="off "
                                   class="layui-input form-control input-lg" value="{$value['marque']}">
                        </div>

                        <label class="layui-form-label col-sm-2 control-label">现价：</label>
                        <div class="layui-input-inline col-sm-3">
                            <input type="text" name="price" autocomplete="off "
                                   class="layui-input form-control input-lg" value="{$value['price']}">
                        </div>
                        <label class="layui-form-label" onclick="removeDiv(this)"><strong><a href="javascript:;"><span
                                class="glyphicon glyphicon-minus"></span></a></strong>
                        </label>
                    </div>
                    {/foreach}


                    <div class="form-group"><label class="col-sm-2 control-label">库存 ：</label>
                        <div class="col-sm-3"><input type="text" name="storage" class="form-control input-lg"
                                                     value="{$DATA['data']['storage']}">
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">商品简介：</label>
                        <div class="col-sm-5"><input type="text" name="detail" class="form-control input-lg"
                                                     value="{$DATA['data']['detail']}">
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">商品详情：</label>

                        <div class="col-sm-9"><textarea name="xiangqing" class="form-control" rows="3">{$DATA['data']['xiangqing']}</textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">商品banner图：</label>
                        <div class="col-sm-9">

                            <div class="imgDiv" id="joinIMG1" style="border:0;padding-left: 20px;" data-type="1"
                                 data-token="{$DATA.token}">
                                <a class="btn btn-default btn-lg">+</a>
                            </div>
                            <!-- Modal -->
                            <div id="Tx_img">
                                {foreach $DATA['banner'] as $key=>$value}
                                <div class="imgDiv" style="float: left;margin-left: 7px;">
                                    <img src="{$value.url}" style="width: 120px; height: 100px;"/>
                                    <span class="fa-stack" data-key="{$value.url}"
                                          style="position: absolute; z-index: 145; border-radius: 100%; top: 0;right: 0;">
                                                  <i class="fa fa-circle fa-stack-2x" style="color: #fff;"></i>
                                                  <i class="fa fa-close fa-stack-1x" style="color: #333;"></i>
                                        </span>
                                </div>
                                {/foreach}
                            </div>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">商品详情图：</label>
                        <div class="col-sm-9">

                            <div class="imgDiv" id="joinIMG1" style="border:0;padding-left: 20px;" data-type="2"
                                 data-token="{$DATA.token}">
                                <a class="btn btn-default btn-lg">+</a>
                            </div>
                            <!-- Modal -->
                            <div id="Xq_img">
                                {foreach $DATA['detail'] as $key=>$value}
                                <div class="imgDiv" style="float: left;margin-left: 7px;">
                                    <img src="{$value.url}" style="width: 120px; height: 100px;"/>
                                    <span class="fa-stack" data-key="{$value.url}"
                                          style="position: absolute; z-index: 145; border-radius: 100%; top: 0;right: 0;">
                                                  <i class="fa fa-circle fa-stack-2x" style="color: #fff;"></i>
                                                  <i class="fa fa-close fa-stack-1x" style="color: #333;"></i>
                                        </span>
                                </div>
                                {/foreach}

                            </div>
                        </div>
                    </div>


                    <br>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-lg btn-white" type="reset">取消</button>
                            <a href="javascript:;" class="btn btn-lg btn-primary" id="insert" data-id="{$DATA['data']['id']}">确定修改</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="uploaderModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <!-- 模态框（Modal）标题 -->
                </h4>
            </div>
            <div class="modal-body">
                <!-- Webuploader HTML -->
            </div>
        </div>
    </div>
</div>